<template>
  <master :title="title">
    <listpage ref="listpage"></listpage>
    <el-dialog :visible.sync="visible">
      <taskDetail @back="visible = false" ref="taskDetail"></taskDetail>
    </el-dialog>
  </master>
</template>
<script type="text/javascript">
(function (G) {
var _this = null;
G.vue({
  "usingComponents": {///引入组件
    "master": "/components/Master/Master",///母版组件
    "listpage": "/components/List/Page/Page",
    "taskDetail":"/pages/flow/task/detail"
  },
  "enablePullDownRefresh": true
},G.modelList({///配置listpage组件
  	modelName:'f_task',///entity名称
    title:'流程任务管理',
    listPage(list,query){///query为前一个页面传过来的参数
      list.searchKey = 'id,title'
      list.canCheck = false ///取消选中按钮 同时取消批量删除
      list.actions.add = false ///取消新增按钮
      list.actions.delet = undefined ///取消行删除按钮
      list.actions.edit = undefined ///取消行修改按钮
      list.actions.push = {///定义操作按钮，默认存在修改和删除
        name:'查看流程进度',///按钮名称
        action(event){///点击回调
          let item = event.detail///数据
          G.$go(`/pages/flow/svg?taskId=${item.id}&flowId=${item.f_flowId}`)
        }
      }
      list.actions.edit = {///定义操作按钮，默认存在修改和删除
        name:'处理',///按钮名称
        action(event){///点击回调
          let item = event.detail///数据
          _this.visible = true
          _this.$nextTick(() => {
            _this.$refs.taskDetail.init(item.id)
          })
        }
      }
    }
  },{
    data:{
      visible:false
    },
    methods:{

    },
    mounted(){
      _this = this
    }
  }));
})(Y)
</script>
<style scoped>
  
</style>